package com.yoyosys.controller;

import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: UserControler配置userinfo的url地址
 * @ClassName: UserController
 * @author: knight
 * @date: 2018年3月8日 下午9:02:25
 */
@RestController
public class UserController {
	@RequestMapping("/user")
	public Object user(Authentication authentication) {
		return authentication.getPrincipal();
	}
}
